Skip to content

使用缩放和插值的主菜单按钮 - #107

Open
GlitchedReme wants to merge 3 commits into
BAKAOLC:devfrom
GlitchedReme:feat/main-menu-scroll-edge-scale
Open

使用缩放和插值的主菜单按钮#107
GlitchedReme wants to merge 3 commits into
BAKAOLC:devfrom
GlitchedReme:feat/main-menu-scroll-edge-scale

Conversation

@GlitchedReme

Copy link
Copy Markdown
Contributor

Summary / 概要

  • 修改了主菜单按钮的排版形式,改为边缘按钮缩放和插值
bandicam.2026-09-09.15-55-21-918.mp4

Notes / 备注

  • 暂无问题,之后再优化

@BAKAOLC BAKAOLC left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

发现两处需要修正的逻辑问题,具体见行内评论。

Comment thread src/Ui/MainMenu/NMainMenuScroller.Input.cs Outdated
Comment thread src/Ui/MainMenu/NMainMenuScroller.cs Outdated
Engage scrolling only after a height tolerance, snap steps from the
actual scroll position, and ease edge scale so top and bottom entries
stay reachable.
@GlitchedReme

Copy link
Copy Markdown
Contributor Author

修正了上面提到的和一些其他问题以及优化

@BAKAOLC BAKAOLC left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上一轮指出的顶部滚动判断和已释放节点访问问题已修正。本轮发现焦点变化后边缘缩放状态未刷新的问题,见行内评论。


private void ApplyEdgeScale(Control item, float top, float height, float topWeight, float bottomWeight)
{
if (IsReticleTarget(item))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 悬停目标变化时也需要刷新边缘缩放。这里对当前目标恢复大小和透明度,但 ApplyEdgeScale 只由 PositionItems 调用;鼠标悬停路径中的 ShowReticles / HideReticles 及其动画只调用 UpdateDecorations,_Process 也不会在布局未变时重新定位。因此等待滚动动画结束,再将鼠标移入一个完全可见但处于 EdgeZone 内的缩小按钮,新的目标仍保持缩小、变淡,直到下一次滚动或布局刷新。反过来,在滚动期间已经恢复正常大小的目标,鼠标移走后也可能继续保留正常大小。请在目标切换或清除时重新计算受影响按钮的边缘缩放和透明度,覆盖无需再次滚动的鼠标移入、移出场景。

Reapply edge scaling for the previous and new reticle targets on
ShowReticles, HideReticles, and HideDecorations so buttons in the edge
zone no longer stay shrunk or full-sized until the next scroll.

@BAKAOLC BAKAOLC left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此前指出的问题均已修正,源码复审未发现新的阻塞问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants